package com.yzs.exam.service;


import com.github.pagehelper.PageInfo;
import com.yzs.exam.entity.User;
import com.yzs.exam.entity.other.KeyValue;
import com.yzs.exam.viewmodel.admin.user.UserPageRequestVM;

import java.util.List;

/**
 * @author yzs
 * @create 2021-03-15 22:01
 */
public interface UserService extends BaseService<User> {
    List<User> getUsers();

    User getUserById(Integer id);

    User getUserByUserName(String username);

    /**
     * 获取用户名和密码
     * @param username
     * @param pwd
     * @return
     */
    User getUserByUserNamePwd(String username, String pwd);

    User getUserByUuid(String uuid);

    /**
     *
     * @param name
     * @param pageIndex
     * @param pageSize
     * @return
     */
    List<User> userPageList(String name, Integer pageIndex, Integer pageSize);

    /**
     *
     * @param name
     * @return
     */
    Integer userPageCount(String name);

    PageInfo<User> userPage(UserPageRequestVM requestVM);

    void insertUser(User user);

    void insertUsers(List<User> users);

    void updateUser(User user);

    void updateUsersAge(Integer age, List<Integer> ids);

    void deleteUserByIds(List<Integer> ids);

    Integer selectAllCount();

    List<KeyValue> selectByUserName(String userName);

    List<User> selectByIds(List<Integer> ids);

    User selectByWxOpenId(String wxOpenId);

    void changePicture(User user, String imagePath);
}
